<section class="ad">
    <?php
        $com_id = 364;
        if (Zend_Registry::isRegistered('main_category')) {
            $category = Zend_Registry::get('main_category');
            switch($category->id) {
                case 'mc69': //adult
                    $com_id = 134;
                    break;
                case 'mc52': //business directory
                    $com_id = 137;
                    break;
                case 'mc55'://car
                    $com_id = 138;
                    break;
                case 'mc51'://clothes
                    $com_id = 139;
                    break;
                case 'mc77'://maids
                    $com_id = 141;
                    break;
                case 'mc73'://electronics
                    $com_id = 142;
                    break;
                case 'mc71'://F and B
                    $com_id = 143;
                    break;
                case 'mc74'://Health
                    $com_id = 144;
                    break;
                case 'mc50'://home and garden
                    $com_id = 145;
                    break;
                case 'mc59'://Jobs
                    $com_id = 146;
                    break;
                case 'mc56'://Pets
                    $com_id = 149;
                    break;
                case 'mc49'://Property
                    $com_id = 150;
                    break;
                case 'mc75'://sports
                    $com_id = 151;
                    break;
                case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                    $com_id = 512;
                    break;
                case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                    $com_id = 530;
                    break;
                case '9ed52f88e33a7409862efc61470038c2'://free
                    $com_id = 553;
                    break;                    
                default:
                    $com_id = 364;
            }
        }
    ?>
    <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
            frameborder='0' scrolling='no' width='160' height='600'>
    </iframe>
        <?php
            $com_id = 359;

            if (Zend_Registry::isRegistered('main_category')) {
                $category = Zend_Registry::get('main_category');
                switch($category->id) {
                    case 'mc69': //adult
                        $com_id = 154;
                        break;
                    case 'mc52': //business directory
                        $com_id = 157;
                        break;
                    case 'mc55'://car
                        $com_id = 158;
                        break;
                    case 'mc51'://clothes
                        $com_id = 173;
                        break;
                    case 'mc77'://maids
                        $com_id = 160;
                        break;
                    case 'mc73'://electronics
                        $com_id = 161;
                        break;
                    case 'mc71'://F and B
                        $com_id = 162;
                        break;
                    case 'mc74'://Health
                        $com_id = 163;
                        break;
                    case 'mc50'://home and garden
                        $com_id = 164;
                        break;
                    case 'mc59'://Jobs
                        $com_id = 165;
                        break;
                    case 'mc56'://Pets
                        $com_id = 168;
                        break;
                    case 'mc49'://Property
                        $com_id = 169;
                        break;
                    case 'mc75'://sports
                        $com_id = 170;
                        break;
                    case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                        $com_id = 511;
                        break;
                    case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                        $com_id = 529;
                        break;
                    case '9ed52f88e33a7409862efc61470038c2'://free
                        $com_id = 552;
                        break;
                    default:
                        $com_id = 359;
                }
            }
        ?>
        <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
                frameborder='0' scrolling='no' width='160' height='600'>
        </iframe>
    <?php if ($this->listing_number > 10):?>
        <?php
            $com_id = 479;

            if (Zend_Registry::isRegistered('main_category')) {
                $category = Zend_Registry::get('main_category');
                switch($category->id) {
                    case 'mc69': //adult
                        $com_id = 374;
                        break;
                    case 'mc52': //business directory
                        $com_id = 412;
                        break;
                    case 'mc55'://car
                        $com_id = 394;
                        break;
                    case 'mc51'://clothes
                        $com_id = 400;
                        break;
                    case 'mc77'://maids
                        $com_id = 419;
                        break;
                    case 'mc73'://electronics
                        $com_id = 425;
                        break;
                    case 'mc71'://F and B
                        $com_id = 431;
                        break;
                    case 'mc74'://Health
                        $com_id = 437;
                        break;
                    case 'mc50'://home and garden
                        $com_id = 443;
                        break;
                    case 'mc59'://Jobs
                        $com_id = 449;
                        break;
                    case 'mc56'://Pets
                        $com_id = 467;
                        break;
                    case 'mc49'://Property
                        $com_id = 473;
                        break;
                    case 'mc75'://sports
                        $com_id = 485;
                        break;
                    case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                        $com_id = 510;
                        break;
                    case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                        $com_id = 528;
                        break;
                    case '9ed52f88e33a7409862efc61470038c2'://free
                        $com_id = 551;
                        break;
                    default:
                        $com_id = 479;
                }
            }
        ?>
        <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
                frameborder='0' scrolling='no' width='160' height='600'>
        </iframe>
    <?php endif;?>
    <?php if ($this->listing_number > 20):?>
        <?php
            $com_id = 480;

            if (Zend_Registry::isRegistered('main_category')) {
                $category = Zend_Registry::get('main_category');
                switch($category->id) {
                    case 'mc69': //adult
                        $com_id = 376;
                        break;
                    case 'mc52': //business directory
                        $com_id = 413;
                        break;
                    case 'mc55'://car
                        $com_id = 395;
                        break;
                    case 'mc51'://clothes
                        $com_id = 401;
                        break;
                    case 'mc77'://maids
                        $com_id = 420;
                        break;
                    case 'mc73'://electronics
                        $com_id = 426;
                        break;
                    case 'mc71'://F and B
                        $com_id = 432;
                        break;
                    case 'mc74'://Health
                        $com_id = 438;
                        break;
                    case 'mc50'://home and garden
                        $com_id = 444;
                        break;
                    case 'mc59'://Jobs
                        $com_id = 450;
                        break;
                    case 'mc56'://Pets
                        $com_id = 468;
                        break;
                    case 'mc49'://Property
                        $com_id = 474;
                        break;
                    case 'mc75'://sports
                        $com_id = 486;
                        break;
                    case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                        $com_id = 510;
                        break;
                    case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                        $com_id = 528;
                        break;
                    case '9ed52f88e33a7409862efc61470038c2'://free
                        $com_id = 551;
                        break;
                    default:
                        $com_id = 480;
                }
            }
        ?>
        <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
                frameborder='0' scrolling='no' width='160' height='600'>
        </iframe>
    <?php endif;?>
    <?php if ($this->listing_number > 25):?>
            <?php
            $com_id = 481;

            if (Zend_Registry::isRegistered('main_category')) {
                $category = Zend_Registry::get('main_category');
                switch($category->id) {
                    case 'mc69': //adult
                        $com_id = 377;
                        break;
                    case 'mc52': //business directory
                        $com_id = 414;
                        break;
                    case 'mc55'://car
                        $com_id = 396;
                        break;
                    case 'mc51'://clothes
                        $com_id = 402;
                        break;
                    case 'mc77'://maids
                        $com_id = 421;
                        break;
                    case 'mc73'://electronics
                        $com_id = 427;
                        break;
                    case 'mc71'://F and B
                        $com_id = 433;
                        break;
                    case 'mc74'://Health
                        $com_id = 439;
                        break;
                    case 'mc50'://home and garden
                        $com_id = 445;
                        break;
                    case 'mc59'://Jobs
                        $com_id = 451;
                        break;
                    case 'mc56'://Pets
                        $com_id = 469;
                        break;
                    case 'mc49'://Property
                        $com_id = 475;
                        break;
                    case 'mc75'://sports
                        $com_id = 487;
                        break;
                    case '9b43a043b8e0b79602bdcf3ef1764e2b'://baby
                        $com_id = 508;
                        break;
                    case '23e810d36582eaf9ba6e094337331033'://classes and lessons
                        $com_id = 526;
                        break;
                    case '9ed52f88e33a7409862efc61470038c2'://free
                        $com_id = 549;
                        break;
                    default:
                        $com_id = 481;
                }
            }
        ?>
        <iframe id='zone_openx_<?php echo $com_id?>' rel="<?php echo $com_id?>" class="zone_openx" name='zone_openx_<?php echo $com_id?>'
                frameborder='0' scrolling='no' width='160' height='600'>
        </iframe>
    <?php endif;?>
</section>
